package com.zeus.base.smscenter.service.impl;

import com.zeus.base.smscenter.mapper.SmsCenterLogMapper;
import com.zeus.base.smscenter.model.Log;
import com.zeus.base.smscenter.service.ISmsCenterLogService;
import com.zeus.base.privilege.utils.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 机构Service
 * @author ShanFei
 * @version 2014-05-16
 */
@Service
@Transactional(readOnly = true)
public class SmsCenterLogServiceImpl implements ISmsCenterLogService {
	@Autowired
	private SmsCenterLogMapper smsCenterLogMapper;

	@Override
	@Transactional(readOnly = true)
	public List<Log> findList(Log role) {
		List<Log> list = smsCenterLogMapper.findList(role);
		return list;
	}

	@Override
	@Transactional(readOnly = true)
	public Log selectByPrimaryKey(Integer id) {
		return smsCenterLogMapper.selectByPrimaryKey(id);
	}

	@Override
	@Transactional(readOnly = true)
	public Log get(Log entity) {
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel insert(Log entity) {
		ResultModel result = null;
		int r = smsCenterLogMapper.insert(entity);
		if(r == 0)
			result = new ResultModel(false,"操作保存失败");
		else
			result = new ResultModel(true,"操作保存成功");
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel insertSelective(Log entity) {
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel update(Log entity) {
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel updateSelective(Log entity) {
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel delete(Integer id) {
		return null;
	}

	@Override
	@Transactional(readOnly = false)
	public ResultModel delete(Log entity) {
		return null;
	}
}
